Configure cli file hyperlinks for R package dev tasks #5850
+4
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #5409
Needed to wait for r-lib/cli#744, which is now merged
QA Notes
Pre-requisite: You need to install a very recent version of the cli package. At the time I write this, this means a dev version of cli, although I think we'll get a release out fairly soon. In the meantime, a good way to install is:
Make sure the cli version is >= 3.6.3.9002:
There won't be any obvious error in the presence of an older cli version, but the new functionality just won't activate.
Then you need to run tests on a package with one or more failing tests, in order to be able to click on the filepath when test failure is reported. This should take you directly to the relevant test location.
I have made a toy package that could be obtained via
usethis::create_from_github("jennybc/clilinks")
. It has a couple of snapshot tests that will always fail 😄 because they attempt to snapshot a random number. But really any package with a failing test will do.pak::pak("r-lib/cli")
usethis::create_from_github("jennybc/clilinks")
Note that this PR removes the feature flag introduced in #5231, since now all hyperlinks work (if the cli version is recent enough). If you configured
positron://settings/positron.r.taskHyperlinks
in the interim, that setting can be removed and, indeed, no longer exists.